<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--
Generated from $Fink: install.xml,v 1.27 2008/06/27 00:55:33 dmrrsn Exp $
-->
<title>Fink Documentation - Fink 0.9.0 Installation</title></head><body><h1 style="text-align: center;">Fink 0.9.0 Installation</h1>
<p>
These are the installation instructions for the "source" distribution
of Fink 0.9.0, intended for use with OS X v.10.5 .  
The instructions
can also be used 
for installation on OS X v.10.4 (replacing
0.9.0 by 0.8.1 throughout the document),
for installation on OS X v.10.3 (replacing
0.9.0 by 0.7.2 throughout the document),
for installation on OS X v.10.2 (replacing
0.9.0 by 0.6.4 throughout the document),
and for installation on OS X v.10.1
(replacing 0.9.0 by 0.4.1a).
</p><p>
This document does not apply to the "<a href="http://www.finkproject.org/download/index.php">binary</a>" distribution.
</p><p>
There are instructions for both first time installation and upgrading
from a previous version.
Fast track instructions for the impatient are at the top.
</p>
<h2>Contents</h2><ul><li><a href="#install-fast"><b>1 The Fast Track</b></a><ul><li><a href="#install-fast.install">1.1 First Time Installation Fast
Track</a></li><li><a href="#install-fast.update">1.2 Update Fast Track</a></li></ul></li><li><a href="#install-first"><b>2 First Time Installation</b></a><ul><li><a href="#install-first.req">2.1 Requirements</a></li><li><a href="#install-first.directory">2.2 Choosing A Directory</a></li><li><a href="#install-first.install">2.3 Installation</a></li><li><a href="#install-first.x11">2.4 Getting X11 Sorted Out</a></li></ul></li><li><a href="#install-up03"><b>3 Upgrading From Fink 0.3.x</b></a><ul><li><a href="#install-up03.packman">3.1 Updating The Package Manager</a></li><li><a href="#install-up03.tetex">3.2 Getting tetex Sorted Out</a></li><li><a href="#install-up03.update-all">3.3 Updating Packages</a></li></ul></li><li><a href="#install-up02"><b>4 Upgrading From Fink 0.2.x</b></a><ul><li><a href="#install-up02.packman">4.1 Updating The Package Manager</a></li><li><a href="#install-up02.descriptions">4.2 Updating The Package Descriptions</a></li><li><a href="#install-up02.x11">4.3 Getting X11 Sorted Out</a></li><li><a href="#install-up02.update-all">4.4 Updating Packages</a></li><li><a href="#install-up02.other">4.5 Other Notes</a></li></ul></li><li><a href="#install-up01"><b>5 Upgrading From Fink 0.1.x</b></a><ul><li><a href="#install-up01.upgrade-01">5.1 Clean cut</a></li></ul></li></ul><h2><a name="install-fast">1 The Fast Track</a></h2>




<p>
This section is for the impatient who don't want to take the time to
learn their way around the command line world and don't care that they
don't know what they're actually doing.
</p>
<p>
If you're looking for the real instructions, skip to the <a href="#install-first">next section</a>.
(You can still use this section as an example.)
</p>



<h3><a name="install-fast.install">1.1 First Time Installation Fast
Track</a></h3>
<p>
Start out by copying the <tt style="white-space: nowrap;">fink-0.9.0-full.tar.gz</tt>
file to your home folder.
(Note: If you have OS X 10.4 and XCode 2.1, you should use
<tt style="white-space: nowrap;">fink-0.8.0-full-XCode-2.1.tar.gz</tt> instead, and make
the appropriate changes below.)
Then, open Terminal.app and follow the session below.
Computer output is in <tt style="white-space: nowrap;">normal face</tt>, your input is in
<tt style="white-space: nowrap;"><b>bold face</b></tt> (or otherwise highlighted).
The actual input prompts from the shell may vary, and some chunks of
the output have been omitted (<tt style="white-space: nowrap;">...</tt>).
</p>
<pre>[frodo:~] testuser% <b>tar xzf fink-0.9.0-full.tar.gz</b>
[frodo:~] testuser% <b>cd fink-0.9.0-full</b>
[frodo:~/fink-0.9.0-full] testuser% <b>./bootstrap /sw</b>

Welcome to Fink.

...
Choose a method: [1] <b>1</b>

sudo /Users/testuser/fink-0.9.0-full/bootstrap .sudo '/sw'
Password:<b>(your normal password here)</b>
...
OK, I'll ask you some questions and update the configuration file in
'/sw/etc/fink.conf'.

In what additional directory should Fink look for downloaded tarballs? [] <b>(press return)</b>
Always print verbose messages? [y/N] <b>(press return)</b>

Proxy/Firewall settings
Enter the URL of the HTTP proxy to use, or 'none' for no proxy. The URL
should start with http:// and may contain username, password or port
specifications. [none] <b>(press return)</b>
Enter the URL of the proxy to use for FTP, or 'none' for no proxy. The URL
should start with http:// and may contain username, password or port
specifications. [none] <b>(press return)</b>
Use passive mode FTP transfers (to get through a firewall)? [Y/n] <b>y</b>

Mirror selection
Choose a continent:
...
<b>(enter the numbers corresponding to your location)</b>
...
Writing updated configuration to '/sw/etc/fink.conf'...
Bootstrapping a base system via /sw/bootstrap.
...
<b>(take a coffee break while Fink downloads and compiles the base packages)</b>
...

You should now have a working Fink installation in '/sw'.

[frodo:~/fink-0.9.0-full] testuser% <b>cd</b>
[frodo:~] testuser% <b>rm -r fink-0.9.0-full</b>
[frodo:~] testuser% <b>/sw/bin/pathsetup.sh</b></pre>
<p>
The last command runs a little script to help set up your Unix paths
(and other things) for use with Fink.  In most cases, it will run
automatically, and prompt you for permission to make changes.  If
the script fails, you'll have to do things by hand.
</p><p>
(If you need to do things by hand, and you are using csh or tcsh,
you need to make sure that the command 
<tt style="white-space: nowrap;">source /sw/bin/init.csh</tt> is executed during startup of
your shell, either by .login, .cshrc, .tcshrc, or something else
appropriate.  If you are using bash or similar shells, the command
you need is <tt style="white-space: nowrap;">. /sw/bin/init.sh</tt>, and places where it
might get executed include .bashrc and .profile.)
</p>
<p>
Once you have set up the paths, open a new Terminal.app window, and close
all other ones.
That's it, you now have a base system installed.
</p>
<p>
You can now install additional packages with the <tt style="white-space: nowrap;">fink</tt>
command, like this:
</p>
<pre>[frodo:~] testuser% <b>fink install xfree86-server gimp</b>
sudo /sw/bin/fink 'install' 'xfree86-server' 'gimp'
Password:<b>(your normal password here)</b>
Reading package info...
Information about 147 packages read.
The following 14 additional packages will be installed:
 audiofile dlcompat esound giflib glib gnome-libs gtk+ imlib libjpeg libpng
 libtiff orbit xfree86-base zlib
Do you want to continue? [Y/n] <b>y</b>
...</pre>
<p>
If these instructions don't work for you, well, you'll have to take
the time to read through the rest of this document and the <a href="http://www.finkproject.org/faq/">online FAQ</a>.
You can also ask on the <a href="http://www.finkproject.org/lists/fink-users.php">fink-users
mailing list</a>, but expect to be pointed back at the
documentation when your problem actually is well-documented.
</p>



<h3><a name="install-fast.update">1.2 Update Fast Track</a></h3>
<p>
Start out by copying the <tt style="white-space: nowrap;">fink-0.9.0-full.tar.gz</tt>
file to your home folder.
(Note: If you have OS X 10.4 and XCode 2.1, you should use
<tt style="white-space: nowrap;">fink-0.8.0-full-XCode-2.1.tar.gz</tt> instead, and make
the appropriate changes below.)
Then, open Terminal.app and follow the session below.
Computer output is in <tt style="white-space: nowrap;">normal face</tt>, your input is in
<tt style="white-space: nowrap;"><b>bold face</b></tt> (or otherwise highlighted).
The actual input prompts from the shell may vary, and some chunks of
the output have been omitted (<tt style="white-space: nowrap;">...</tt>).
</p>
<pre>[frodo:~] testuser% <b>tar xzf fink-0.9.0-full.tar.gz</b>
[frodo:~] testuser% <b>cd fink-0.9.0-full</b>
[frodo:~/fink-0.9.0-full] testuser% <b>./inject.pl /sw</b>
sudo ./inject.pl /sw
Password:<b>(your normal password here)</b>
Copying package descriptions
...
Done.

Your Fink installation in '/sw' was updated with new fink packages.

[frodo:~/fink-0.9.0-full] testuser% <b>cd pkginfo</b>
[frodo:~/fink-0.9.0-full/pkginfo] testuser% <b>./inject.pl /sw</b>
sudo ./inject.pl /sw
Copying...
...

Your Fink installation in '/sw' was updated with new package description
files. Use appropriate fink commands to update the packages, e.g. 'fink
update-all'.

[frodo:~/fink-0.9.0-full/pkginfo] testuser% <b>cd</b>
[frodo:~] testuser% <b>rm -r fink-0.9.0-full</b>
[frodo:~] testuser% <b>fink update-all</b>
...</pre>



<h2><a name="install-first">2 First Time Installation</a></h2>



<h3><a name="install-first.req">2.1 Requirements</a></h3>
<p>
You need:
</p>
<ul>
<li><p>
An installed Mac OS X system, version 10.1 or later.
Darwin 5.0 and later should also work, but this has not been tested.
Earlier versions of both are not supported and probably will
<b>not</b> work.
</p></li>
<li><p>
Development tools.
On Mac OS X, install the Developer.pkg package from the Developer
Tools CD.
On Darwin, the tools should be present in the default install.
</p></li>
<li><p>
Many other things that come with Mac OS X and the Developer Tools.
This includes perl 5.6 and either wget or curl.
</p></li>
<li><p>
Internet access.
All source code is downloaded from mirror sites.
</p></li>
<li><p>
Patience.
Compiling several big packages takes time.
I'm talking hours or even days here.
</p></li>
</ul>


<h3><a name="install-first.directory">2.2 Choosing A Directory</a></h3>
<p>
Before you install, you must decide where Fink's directory hierarchy
will live. The recommended place is /sw, and all examples in this
document will use that. Any other directory should be fine as well, as
long as you don't use existing directories like /usr/local or
/usr. The bootstrap script tries to catch these.
</p>
<p>
If you intend to use the binary distribution (through apt-get /
dselect), you must install to /sw.
Unfortunately, binary packages are not relocatable.
</p>
<p>
The directory that you choose must not contain any spaces or similar.
Both Unix itself and the bulk of Unix software were written under this
assumption.
Using symlinks to trick the bootstrap script simply won't work.
</p>
<p>
A special note about /usr/local: While it is possible to install Fink
in /usr/local (and the bootstrap script will let you do that after a
confirmation), it is a bad idea. Many third party software packages
install into /usr/local. This can cause severe problems for Fink,
including overwriting files, dpkg refusing to install packages and
strange build errors. Also, the /usr/local hierarchy is in the default
search path for the shell and the compiler. That means that it is much
more difficult to get back to a working system when things break. You
have been warned.
</p>


<h3><a name="install-first.install">2.3 Installation</a></h3>
<p>
First, you need to unpack the fink-0.9.0-full.tar.gz tarball.
(Note: If you have OS X 10.4 and XCode 2.1, you should use
<tt style="white-space: nowrap;">fink-0.8.0-full-XCode-2.1.tar.gz</tt> instead, and make
the appropriate changes below.)
It is recommended that you do this from the command line -
StuffIt Expander has a tendency to screw up text files.
So, go to the directory where you put the tarball, and run this
command:
</p>
<pre>tar xzf fink-0.9.0-full.tar.gz</pre>
<p>
You now have a directory named fink-0.9.0-full.
Change to it with <tt style="white-space: nowrap;">cd fink-0.9.0-full</tt>.
</p>
<p>
The actual installation is performed by the perl script
bootstrap.
So, to start installation, go to the fink-0.9.0-full directory and run
this command:
</p>
<pre>./bootstrap</pre>
<p>
After running some tests, the script will ask you what method should
be used to gain root privileges.
The most useful choice is 'sudo'.
On a default install of Mac OS X, sudo is already enabled for the user
account created during installation.
The script will immediately use the method you choose to become root.
This is required for the installation.
</p>
<p>
Next, the script will ask you for the installation path.
See 'Choosing A Directory' above for hints about this.
The script will create the directory and set it up for the bootstrap
that will be done later.
</p>
<p>
Next up is Fink configuration.
This consists mainly of setting proxies and selecting mirror sites for
downloading.
The process should be self-explaining.
If you don't know what to say, you can just press Return and Fink will
use a reasonable default value.
</p>
<p>
Finally, the script has enough information to conduct the bootstrap
process.
That means it will now download, build and install some essential
packages.
Don't worry if you see some packages being compiled twice.
This is required because to build a binary package of the package
manager, you first must have the package manager available.
</p>


<h3><a name="install-first.x11">2.4 Getting X11 Sorted Out</a></h3>
<p>
Fink uses virtual packages to declare dependencies on X11.
As there are several X11 implementations available for Mac OS X
(XFree86, Tenon Xtools, eXodus) and several ways to install them
(manually or via Fink), there are several actual packages - one for
each setup.
Fink is quite bad at guessing what you have, so it's best to get this
sorted out right at the beginning.
Here is a list of the available packages and installation methods:
</p>
<ul>
<li><p>
xfree86-base:
This package is the real thing.
It will fetch the XFree86 source, compile it and install it into
/usr/X11R6.
For maximum flexibility, this package does not contain the actual
XDarwin server.
To get it, you can install the xfree86-server package.
Or you can install it manually, for example using an "XDarwin" test
release from the XonX project or one of the "rootless" servers
circulating the net.
</p></li>
<li><p>
system-xfree86:
This package expects that you installed XFree86 manually, either from
source or from the official binary distribution.
It will just check that the installation is useful and then act as a
dependency placeholder.
Note that XFree86 4.0.2 or 4.0.3 will not pass the test.
You need a version that builds shared libraries.
Usually that will be 4.1.0, but CVS versions not older than a few
months will also work.
</p></li>
<li><p>
system-xtools:
Install this package if you have Tenon's Xtools product installed.
Like system-xfree86, this will just do a sanity check and leave the
actual files alone.
</p></li>
</ul>
<p>
For more information on installing and running X11, refer to the
online <a href="http://www.finkproject.org/doc/x11/">X11 on Darwin
and Mac OS X document</a>.
</p>


<h2><a name="install-up03">3 Upgrading From Fink 0.3.x</a></h2>




<p>
If you already have Fink 0.3.x installed, you can update your
installation to 0.9.0 with the built-in 'selfupdate' command.
</p>


<h3><a name="install-up03.packman">3.1 Updating The Package Manager</a></h3>
<p>
To update Fink, run the following command:
</p>
<pre>fink selfupdate</pre>
<p>
This will automatically update your existing Fink installation to
use the latest package manager, and also update all essential
packages. However, it will not update any other packages.
</p>


<h3><a name="install-up03.tetex">3.2 Getting tetex Sorted Out</a></h3>
<p>
If you are upgrading from a Fink release prior to 0.3.1, and you have
tetex installed, you should run the command "fink remove tetex" before
upgrading. (It may also be necessary to remove the packages which
depend on tetex, such as lyx, before tetex can be removed.) Afterwards
you can again install tetex and the other packages you removed. 
</p>


<h3><a name="install-up03.update-all">3.3 Updating Packages</a></h3>
<p>
The above updating steps will not update the actual packages, they
only provide you with the means to do so. The easiest way to get the
new packages is to use the 'update-all' command:
</p>
<pre>fink update-all</pre>
<p>
This will bring all installed packages to the latest version.
If you don't want to do this (it may take some time), you can update
individual packages with the 'update' command.
</p>


<h2><a name="install-up02">4 Upgrading From Fink 0.2.x</a></h2>




<p>
If you already have Fink 0.2.x installed, you can update your
installation to 0.9.0 with this package.
</p>
<p>
Actually, there are two pieces that are updated independently: the
package manager and the package descriptions. It is recommended to
update the package manager first.
</p>


<h3><a name="install-up02.packman">4.1 Updating The Package Manager</a></h3>
<p>
To update the package manager, run the inject.pl script in the
fink-0.9.0-full directory, like this:
</p>
<pre>./inject.pl</pre>
<p>
It will try to locate your Fink installation automatically. If it
can't find it, you can pass the path as a parameter, like this:
</p>
<pre>./inject.pl /sw</pre>
<p>
The script copies the package descriptions into the appropriate
directory, creates tarballs in /sw/src and then runs fink to install
the new versions of the fink and base-files packages.
(Yes, that means that fink updates itself. <tt style="white-space: nowrap;">:-)</tt> )
</p>


<h3><a name="install-up02.descriptions">4.2 Updating The Package Descriptions</a></h3>
<p>
If you downloaded the fink-0.9.0-full tarball, the package
descriptions are in the subdirectory pkginfo. To install them, run the
inject.pl script in that directory:
</p>
<pre>cd pkginfo
./inject.pl</pre>
<p>
This inject.pl script works just like the one for the package
manager.
</p>
<p>
You can also grab the package descriptions as a separate tarball,
packages-0.9.0. If you did that, just unpack it and run the inject.pl
script inside.
</p>
<p>
As a third alternative, you can have Fink automatically update itself to
the latest set of package descriptions by issuing the following command:
</p>
<pre>fink selfupdate</pre>


<h3><a name="install-up02.x11">4.3 Getting X11 Sorted Out</a></h3>
<p>
The first thing you should do after updating the package descriptions
is getting the X11 dependencies settled (unless you already did that
after upgrading to 0.2.3).
Refer to the "Getting X11 Sorted Out" section under "First Time
Installation" above.
</p>


<h3><a name="install-up02.update-all">4.4 Updating Packages</a></h3>
<p>
The above updating steps will not update the actual packages, they
only provide you with the means to do so. The easiest way to get the
new packages is to use the 'update-all' command:
</p>
<pre>fink update-all</pre>
<p>
This will bring all installed packages to the latest version.
If you don't want to do this (it may take some time), you can update
individual packages with the 'update' command.
</p>


<h3><a name="install-up02.other">4.5 Other Notes</a></h3>
<p>
IMPORTANT! When you update from Fink 0.2.0 or a CVS version before
0.2.1, the first thing you should do after running the inject.pl
scripts is this:
</p>
<pre>fink update dpkg</pre>
<p>
There was a bug in dpkg that could lead to partially extracted
packages. If you had unusual trouble with installed packages,
especially missing symlinks, use 'fink reinstall' on them to
re-install the .deb package files.
</p>


<h2><a name="install-up01">5 Upgrading From Fink 0.1.x</a></h2>



<h3><a name="install-up01.upgrade-01">5.1 Clean cut</a></h3>
<p>
There is no direct upgrade path from Fink 0.1.x to Fink 0.2.x, because
they use different methods for underlying package management (stow
vs. dpkg). The only way to upgrade is to do a complete reinstall. The
procedure is as follows:
</p>
<ul>
<li><p>
Save any changes you have made to configuration files etc.
</p></li>
<li><p>
Save a list of packages you had installed. Hint: Try
<tt style="white-space: nowrap;">ls /sw/var/fink-stamp</tt>.
</p></li>
<li><p>
If you have the source tarballs still lying around in /sw/src and
don't want to download them again, move them to another directory.
</p></li>
<li><p>
Wipe out the /sw directory, i.e. <tt style="white-space: nowrap;">cd / ; rm -rf /sw</tt>.
Do this as root if necessary.
</p></li>
<li><p>
Follow the procedures for a first time installation above.
</p></li>
<li><p>
When you're asked for an 'additional directory for downloaded
tarballs', enter the directory you moved the tarballs to.
</p></li>
<li><p>
Reinstall the packages you need.
</p></li>
</ul>


<hr><h2>Copyright Notice</h2><p>Copyright (c) 2001 Christoph Pfisterer,
Copyright (c) 2001-2011 The Fink Project.
You may distribute this document in print for private purposes,
provided the document and this copyright notice remain complete and
unmodified. Any commercial reproduction and any online publication
requires the explicit consent of the author.</p><hr>
<p>Generated from <i>$Fink: install.xml,v 1.27 2008/06/27 00:55:33 dmrrsn Exp $</i></p></body></html>
